<template>
  <div class="subBtn" :class="centerBtn ? 'subCenter' : ''">
    <slot name="btn"></slot>
  </div>
</template>

<script>
export default {
    name:'SubBtn',
    props:{
      // 按钮是否居中
      centerBtn: {
        type: Boolean,
        default: false,
      },
    },
}
</script>

<style scoped>
.subBtn{
  position: absolute;
  left: 0;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  width: 100%;
  padding: 20px 30px;
  border-top: 1px solid #ECEDF0;
  background-color: #fff;
  z-index: 2;
}
.subBtn.subCenter{
  justify-content: center;
}
.subBtn .el-button{
  padding: 0;
  width: 110px;
  padding: 10px 0;
  /* font-weight: bold; */
  color: #999;
}

.subBtn .el-button.addBtn{
  border-color: #F87A23;
  background-color: #F87A23;
  color: #fff;
}

.subBtn .el-button.addBtn:hover,
.subBtn .el-button.addBtn:focus{
  border-color: #F87A23;
  background-color: #F87A23;
  color: #fff;
  opacity: .9;
}
</style>